package com.dys.designpattern.builder;

import com.dys.designpattern.builder.commander.Director;
import com.dys.designpattern.builder.creater.Builder;
import com.dys.designpattern.builder.creater.HelloBuilder;
import com.dys.designpattern.builder.creater.MobikeBuilder;
import com.dys.designpattern.builder.product.Bike;

/**
 * @Author: 疾风
 * @ClassName: Client
 * @Description: 客户端
 * @CreateDate: 2024/05/28
 * @Version: v1.0.0
 */
public class Client {

    public static void main(String[] args) {

        showBike(new HelloBuilder());
        showBike(new MobikeBuilder());
    }

    public static void showBike(Builder builder) {
        Director director = new Director(builder);
        Bike construct = director.construct();
        System.out.println(construct.getFrame());
        System.out.println(construct.getSeat());
    }
}
